package minigame;
import javax.swing.ImageIcon;

public class giacam extends thuoctinh 
{
	private Trung trung;
    String images = "images/egg.png";
	//tao 1 gia cam de ve ga vit ngan
    public giacam(int x, int y, String giac) {
        this.x = x;
        this.y = y;
        trung = new Trung(x, y, images);
        
        ImageIcon ii = new ImageIcon(giac);
        setImage(ii.getImage());

    }
    
    //ham act duoc goi de gia gia cam di chuyen theo huong ngan
	public void act(int direction) {
        this.x += direction;
    }
	
	//ham getTrung() duoc goi khi ga de trung
	public Trung getTrung() {
        return trung;
    }
	
}

